|
|
|
|
|
|
|
In this chapter, you learn how to use Crystal Reports to design and create reports that you can add to your application. In addition, you will take a close look at how to incorporate these reports into your application by creating a report selection form. Finally, the CommonDialog Print dialog box will be added to the form, enabling the user to modify the Printer Setup options. At the end of the process the user will be able to select a report, choose some filter options, and then run the report. |
|
|
|
|
|
|
|
|
Crystal Reports is a powerful program for creating custom reports, lists, and labels from the data in your application database. When Crystal Reports connects to the database, it reads in the values from the fields you selected and places them into a report, either as-is or as part of a formula that generates more complex values. |
|
|
|
|
|
|
|
|
There is a wide range of built-in tools that can be used to manipulate data to fit the requirements of the report. These tools enable you to do the following: |
|
|
|
 |
|
|
|
|
Create calculations |
|
|
|
 |
|
|
|
|
Calculate subtotals and grand totals |
|
|
|
 |
|
|
|
|
Calculate averages |
|
|
|
 |
|
|
|
|
Count the total number of records in a query |
|
|
|
 |
|
|
|
|
Test for the presence of specific values |
|
|
|
 |
|
|
|
|
Filter database records |
|
|
|
|
|
|
|
|
The data from your database can be placed and formatted exactly where you need it when designing the report. Using Crystal Reports, your reports can be as simple or as complex as your needs require. After you have designed a report for your application, you can use it within the application or as a template to create other similar reports. Although most database programs include their own report generators, they are usually too difficult for non-technical people to use, and they generally require a good understanding of how that database program works. Crystal Reports is both an end user reporting tool and a report development tool. |
|
|
|
|
|
|
|
|
In keeping with the design concept of Visual Basic, Crystal Reports can connect to almost any database available. There are actually two methods of connecting to a database in Crystal Reports: the Data File and the SQL/ODBC. The first method is designed for the simpler, PC-based databases, such as dBASE and Microsoft Access. The other method is to use ODBC (Open Database Connectivity) to connect to any database that has an ODBC connection, such as Oracle, Sybase, and Microsoft SQL Server. |
|
|
|
|
|